# 递归
# 计算5的阶乘
def fac(n):
    if n == 1:
        return 1
    else:
        return n * fac(n-1)
print(fac(5))

# 斐波那契数列 f(n)=f(n-1)+f(n-2)
def fib(n):
    if n == 1 or n == 2:
        return 1
    else:
        return fib(n-1) + fib(n-2)
print(fib(9))